import service from '@/utils/request';

const OrderApi = {
  listOrder: function (data) {
    return service.get('order/page', { params: data });
  },
  cancelOrder: function (data) {
    return service.put('order/cancelOrder', data);
  },
  getOrderInfo(data) {
    return service.get('order', { params: data });
  },
  orderPrint(data) {
    return service.get('order/orderPrint', { params: data });
  },
  takeOrder(data) {
    return service.put('order/takeOrders', data);
  },
  orderOperate(data) {
    return service.put('order/orderOperate', data);
  },
  orderChangePrice(data) {
    return service.put('order/orderChangePrice', data);
  },
  orderSalesReturn(data) {
    return service.put('order/salesReturn', data);
  },
  addOrder(data) {
    return service.post('order/addOrder', data);
  },
  orderOperationRecord(data) {
    return service.get('orderOperation/listByOrderId', { params: data });
  },
  exportOrder(data) {
    return service.get('order/exportOrder', { params: data, responseType: 'blob' });
  },
  exportSettle(data) {
    return service.get('operateSettleGoods/exportSettle', { params: data, responseType: 'blob' });
  },
  affirmOrder(data) {
    return service.put('order/affirmOrder', data);
  },
  editFormInfo(data) {
    return service.put('orderAttr/setOrderAttr', data);
  },
  setWaiter(data) {
    return service.put('order/setWaiter', data);
  },
  printStatistics(data) {
    return service.get('order/printStatistics', { params: data });
  },
  listKlabReportUrl(data) {
    return service.get('order/listKlabReportUrl', { params: data });
  },
  transfersOrder(data) {
    return service.put('order/transfersOrder', data);
  },
  listTransferRecord(data) {
    return service.get('transferOrderRecord/listTransferRecord', { params: data });
  },
  setExpectedTime(data) {
    return service.put('order/setExpectedTime', data);
  },
  setInvoice(data) {
    return service.put('order/setInvoice ', data);
  },
  orderBatchOperate(data) {
    return service.put('order/orderBatchOperate ', data);
  },
  callBeeper(data) {
    return service.get('order/callBeeper', { params: data });
  },
  rescueDetail(data) {
    return service.get('waiter/listFirstAidWaiter', { params: data });
  },
  orderCancelAlarm(data) {
    return service.put('/order/orderCancelAlarm', data);
  },

  // 选择警报地址生成订单
  AlarmAddressOrder(data) {
    return service.post('/order/alarmAddressOrder', data);
  },

  // 套餐追加下单
  combineAdditionOrder(data) {
    return service.post('/order/combineAdditionOrder', data);
  },
  delOrder(data) {
    return service.put('/order/delete', data);
  },
  OrderAddReamrk(data) {
    return service.post('/order/addRemark', data);
  },

  //根据订单查询通知数据
  listDataOperate(params) {
    return service.get('/orderNotify/listDataOperate', { params });
  },

  //根据订单查询通知数据
  orderNotifyCall(data) {
    return service.post('/orderNotify/orderNotifyCall', data);
  },
  batchOrderNotifyCall(data) {
    return service.post('/orderNotify/batchOrderNotifyCall', data);
  },

  pageHelpDataOperate(params) {
    return service.get('/orderNotify/pageHelpDataOperate', { params });
  },

  getBeeperCode(params) {
    return service.get('/equip/getEquipWxUrl', { params });
  },

  // 代打卡
  healthClock(data) {
    return service.post('/customer/healthClock', data);
  },

  //修改订单备注
  editOrderRemark(data){
    return service.put('/order/updateRemark', data);
  },

  //追加报警订单
  addToOrder(params) {
    return service.get('/alarm/additionAlarm', { params });
  },

  //获取定位记录
  getLocationRecord(params) {
    return service.get('/beeperPositionRecord/listRecordByOrder', { params });
  },
  
};

export default OrderApi;
